/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author admin
 */
@Entity
@Table(name = "stipendio")
@NamedQueries({
    @NamedQuery(name = "Stipendio.findAll", query = "SELECT s FROM Stipendio s"),
    @NamedQuery(name = "Stipendio.findById", query = "SELECT s FROM Stipendio s WHERE s.id = :id"),
    @NamedQuery(name = "Stipendio.findByCifra", query = "SELECT s FROM Stipendio s WHERE s.cifra = :cifra"),
    @NamedQuery(name = "Stipendio.findByAnno", query = "SELECT s FROM Stipendio s WHERE s.anno = :anno"),
    @NamedQuery(name = "Stipendio.findByMese", query = "SELECT s FROM Stipendio s WHERE s.mese = :mese"),
    @NamedQuery(name = "Stipendio.findByTutorid", query = "SELECT s FROM Stipendio s WHERE s.tutorid = :tutorid")})
public class Stipendio implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "cifra")
    private Double cifra;
    @Column(name = "anno")
    private String anno;
    @Column(name = "mese")
    private String mese;
    @Column(name = "tutorid")
    private Integer tutorid;

    public Stipendio() {
    }

    public Stipendio(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getCifra() {
        return cifra;
    }

    public void setCifra(Double cifra) {
        this.cifra = cifra;
    }

    public String getAnno() {
        return anno;
    }

    public void setAnno(String anno) {
        this.anno = anno;
    }

    public String getMese() {
        return mese;
    }

    public void setMese(String mese) {
        this.mese = mese;
    }

    public Integer getTutorid() {
        return tutorid;
    }

    public void setTutorid(Integer tutorid) {
        this.tutorid = tutorid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Stipendio)) {
            return false;
        }
        Stipendio other = (Stipendio) object;
        return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id));
    }

    @Override
    public String toString() {
        return "jpa.Stipendio[id=" + id + "]";
    }

}
